<html>
	<head>

		<style type="text/css">
	      h2{
	  font-size:30px;
	  color: #006e99;
	  text-align:center;
	      }
		  
		  #center {
		  	margin: 0 auto;
		  	height: 500px;
		  	width: 700px;
		  	text-align: center;
		  	overflow: hidden;
		  	padding: 20px;
		  	
		  }
		  .input-group
		  {
		  	padding:10px;
			font-size: 20px;

		  }
		  .button{
			  background-color: #0b93d5;
			  color: white;
			  height: 35px;
			  width: 85px;
			  font-size: 15px;
		  }
	      </style>

	
	</head>
	<body>

	<div id="center">
		<h2 >个人信息</h2>

			<div class="input-group" >
				<span style="font-family: 楷体">
					用户名：

				<input  id="username" name="username" type="text" style="height:40px" value=""  autocomplete="off" readonly="readonly">
				</span>
			</div>
			<div class="input-group" >
				<span style="font-family: 楷体;" >
					姓&nbsp;&nbsp;名：
			   
				
				<input  id="name" name="name" type="text" style="height:40px" value=""  autocomplete="off" readonly="readonly">
				</span>
			</div>


			<div class="input-group" >
				<span style="font-family: 楷体;">
					电&nbsp;&nbsp;话：
				
				<input  id="tel" name="tel" type="tel" style="height:40px" value=""  autocomplete="off" readonly="readonly">
				</span>
			</div>
			<div style="margin-top:20px">
				
				<input class="button"  name="registerButton" id="register" type="button" value="点击修改">
			</div>
		</form>
	</div>
	<script src="bower_components/jquery/dist/jquery.min.js" ></script>
	<script type="text/javascript">

		$(function (){
			doshujuObject()
		})
		$(function (){
			$(".button").on("click",doUpdate)
		})
		function doUpdate(){
			let url="grxx-edit"
			$("#mainContentId").load(url)

		}
		function doshujuObject(){
			var username = $("#loginUserId").text();
			//console.log(username)

			let url = 'findUserByUserName';
			let params='username='+username;
			$.ajax({
				url:url,
				data:params,
				success:function (result){
					doFindShuju(result.data)
					//console.log(result.data)

				}
			});
			function doFindShuju(data){
				let input=$("#input-group")
				input.empty();
				for (let i=0;i<data.length;i++){
					doFindShujuRows(data[i])
					//console.log(data[i])

				}

			}
			function doFindShujuRows(rows){
				//console.log(rows)
				// $(this).val(""); //清空上次input框里的数据
				$("#name").val(rows.name);  //往input框里传值
				$("#username").val(rows.username);  //往input框里传值
				$("#tel").val(rows.tel);  //往input框里传值


			}
		}










	</script>
	</body>





